# -*- coding: utf-8 -*-
# @Time : 2023/11/13 11:48
# @Author : yuancheng
# @File : 四叶玫瑰数.py.py
for i in range(1000,10000):
    i1=i//1000
    i2=i//100%10
    i3=i//10%10
    i4=i%10
    if i1**4+i2**4+i3**4+i4**4==i:
       print(i)



